// import { showSuccessToast, showFailToast, setToastDefaultOptions, showToast } from 'vant'
import { ElMessage } from 'element-plus'

setToastDefaultOptions({ duration: 2000, teleport: '#app' })
export default {
  // 顶部成功提示
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
  successMsg(msg: string) {
    ElMessage({ message: msg, type: 'success', plain: true })
  },
  // 顶部失败提示
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
  errorMsg(msg: string) {
    ElMessage({ message: msg, plain: true })
  },
  showToast(msg: string) {
    ElMessage({ message: msg, type: 'info', plain: true })
  },
  close() {
    ElMessage.closeAll()
  },
}
